﻿Type=Service
Version=2.71
@EndOfDesignText@
#Region  Service Attributes 
	#StartAtBoot: False
#End Region

Sub Process_Globals
	'These global variables will be declared once when the application starts.
	'These variables can be accessed from all modules.
	Dim HttpJobTool As HttpJob
End Sub
Sub Service_Create

End Sub

Sub Service_Start (StartingIntent As Intent)
	StartServiceAt("", DateTime.Now + PublicVar.GV_TB_RefreshTime * DateTime.TicksPerSecond, False)
	TBData
End Sub

Sub Service_Destroy

End Sub

Sub TBData



End Sub

Sub JobDone (Job As HttpJob)
   If Job.Success = True Then
      If Job.JobName = "Job1" Then
				HttpJobSuccess(Job)
      End If
   Else
		HttpJobError(Job)
   End If
   Job.Release
End Sub

Sub HttpJobSuccess(Job As HttpJob) 
'	Dim sResult,sCode,sData As String
'	Dim mapResult As Map
'	
'	ProgressDialogHide
'	sResult = Job.GetString.Trim
'	
'	PublicVar.GV_JSonTool.Initialize(sResult)
'	mapResult = PublicVar.GV_JSonTool.NextObject
'	
'	sCode = mapResult.Get("Code")
'	If sCode<>"0" Then
'		sResult = mapResult.Get("Message")
'		ToastMessageShow("获取数据失败"&CRLF &sResult, True)	
'		Return
'	End If
'	
'	sData = mapResult.Get("Data")
'	If sData ="" Then
'	
'		Return	
'	End If
	
	
End Sub

Sub HttpJobError(Job As HttpJob) 
'	Dim sMsg As String
'	ProgressDialogHide
'	
'	Log("Error: " & Job.ErrorMessage)
'	sMsg = "获取通知内容失败."& CRLF & Job.ErrorMessage 
'  ToastMessageShow(sMsg, True)
End Sub
